package com.tzbank.wisdom.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.hibernate.annotations.Table;

import com.tzbank.entity.BaseModel;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity(name = "mb_single_device_login")
@Table(appliesTo = "mb_single_device_login", comment = "单设备登录信息表")
public class SingleDeviceLogin extends BaseModel implements Serializable {

	private static final long serialVersionUID = -6545556992351951366L;

	@ApiModelProperty(value = "记录ID")
	@Column(name = "record_id", columnDefinition = "varchar(100)  NOT NULL COMMENT '记录ID'")
	private String recordId;

	/**
	 * 用户ID
	 */
	@ApiModelProperty(value = "用户ID")
	@Column(name = "user_id", columnDefinition = "varchar(50)  NOT NULL COMMENT '用户ID'")
	private String userId;

	/**
	 * 用户token
	 */
	@ApiModelProperty(value = "用户token")
	@Column(name = "token", columnDefinition = "varchar(100)  NOT NULL COMMENT '用户token'")
	private String token;

	/**
	 * 设备号
	 */
	@ApiModelProperty(value = "设备号")
	@Column(name = "device_id", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '设备号'")
	private String deviceId;

	/**
	 * 版本号
	 */
	@ApiModelProperty(value = "版本号")
	@Column(name = "version", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '版本号'")
	private String version;

	/**
	 * 网络
	 */
	@ApiModelProperty(value = "网络")
	@Column(name = "network", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '网络'")
	private String network;

	/**
	 * WIFI名
	 */
	@ApiModelProperty(value = "WIFI名")
	@Column(name = "wifi_name", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT 'WIFI名'")
	private String wifiName;

	/**
	 * 设备类型
	 */
	@ApiModelProperty(value = "设备类型")
	@Column(name = "device_type", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '设备类型'")
	private String deviceType;

	/**
	 * 登录地址
	 */
	@ApiModelProperty(value = "登录地址")
	@Column(name = "address", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '登录地址'")
	private String address;

	/**
	 * 登录状态
	 */
	@ApiModelProperty(value = "登录状态")
	@Column(name = "login_state", columnDefinition = "varchar(2)  DEFAULT NULL COMMENT '登录状态'")
	private String loginState;

	/**
	 * 上次登录时记录的ID
	 */
	@ApiModelProperty(value = "上次登录时记录的ID")
	@Column(name = "LastRecord_id", columnDefinition = "varchar(100)  DEFAULT NULL COMMENT '上次登录时记录的ID'")
	private String LastRecordId;
	
	/**
	 * 登录时间
	 */
	@ApiModelProperty(value = "登录时间")
	@Column(name="login_date", columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '登录时间'")
	private Date loginDate;
	
	/**
	 * 登出时间
	 */
	@ApiModelProperty(value = "登出时间")
	@Column(name="logout_date", columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '登出时间'")
	private Date logoutDate;
	
	
	/**
	 * 经度
	 */
	@ApiModelProperty(value = "经度")
	@Column(name = "longitude", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '经度'")
	private String longitude;
	
	
	/**
	 * 维度
	 */
	@ApiModelProperty(value = "维度")
	@Column(name = "latitude", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '维度'")
	private String latitude;
	

}
